package com.guldan.core.enums;

/**
 * Created by Silas.
 * Date: 2016/11/17
 * Time: 0:41
 */
public enum GAuthResTypeEn {

    MENU("MENU", "菜单"),
    FUN("FUN", "功能"),
    UNKNOWN("UNKNOW", "未知");

    private String code;
    private String mean;

    GAuthResTypeEn(String code, String mean) {
        this.code = code;
        this.mean = mean;
    }

    public static GAuthResTypeEn toEnum(String code) {
        GAuthResTypeEn[] values = values();
        for (GAuthResTypeEn en : values) {
            if (en.getCode().equals(code)) {
                return en;
            }
        }
        return UNKNOWN;
    }

    public String getCode() {
        return code;
    }

    public String getMean() {
        return mean;
    }
}
